function startRequest()
{
  tfCommandText = document.getElementById('tfCommand').value;
  var btnWykonaj = document.getElementById('btnWykonaj');
  btnWykonaj.disabled = true;

  url = "http://localhost/dane.php?command=" + tfCommandText;
  url = encodeURI(url);
  startGETRequest(url, onComplete, onEnd);
}

function onComplete(text, xml)
{
  var div = document.getElementById('dataDiv');
  text = "<pre>" + text + "</pre>";
  div.innerHTML = text;
}

function onEnd()
{
  btnWykonaj = document.getElementById('btnWykonaj');
  btnWykonaj.disabled = false;
}